package com.cyt.work.kwmanagement.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import com.cyt.wx.model.po.WxMember;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 学生签到表-学生签到表实体类
 *
 * @author Han Jun
 * @date 2019-12-11 15:33:49
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_kw_student_sign")
public class KwStudentSign implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 模块ID
     */ 
	@Column(name = "apply_id")
	private String applyId;

	/**
     * 考务id
     */ 
	@Column(name = "ks_id")
	private String ksId;


	/**
	 * 科目Id
	 */
	@Column(name = "km_id")
	private String kmId;

	/**
     * 学生id
     */ 
	@Column(name = "education_userid")
	private String educationUserid;

	/**
     * 考场id
     */ 
	@Column(name = "kc_id")
	private String kcId;

	/**
     * 签到状态(1:已签，2：未签)
     */ 
	@Column(name = "sign_state")
	private String signState;

	/**
     * 状态(1:正常，2：删除)
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author Han Jun
	 * @date 2019-12-11 15:33:49
	 */
	public KwStudentSign(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
	public KwStudentSign(WxMember wxMember) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = wxMember.getId();
		this.updateTime = new Date();
		this.updateUser = wxMember.getId();
	}
}